properties.md

Test Function Properties

This page documents the properties used to classify benchmark functions in NonlinearOptimizationTestFunctions.jl. Properties are string tags stored in a Set{String} and describe mathematical characteristics of each function. They are rigorously validated against a fixed list to ensure consistency.

Current Statistics (as of December 2025)

The package currently contains 205 benchmark functions.

Property distribution:

CountPropertyPercentage
196continuous95.6%
173differentiable84.4%
155bounded75.6%
147multimodal71.7%
141non-separable68.8%
73scalable35.6%
71non-convex34.6%
55separable26.8%
55unimodal26.8%
24partially differentiable11.7%
14convex6.8%
11controversial5.4%
5has_noise2.4%
5highly multimodal2.4%
4deceptive2.0%
4ill-conditioned2.0%
3finiteatinf1.5%
3partially separable1.5%

Total distinct properties: 18

Available Properties

The package defines the following valid properties:

PropertyDescriptionCommon Examples
boundedFinite box constraints (lb and ub are defined and finite)beale, branin, michalewicz
continuousContinuous everywhere in the domainMost functions
controversialGlobal minimum or value debated in literaturelangermann
convexConvex (unique global minimum)sphere, quadratic
deceptiveDesigned to mislead certain optimizersRare
differentiableDifferentiable everywhererosenbrock, ackley
finiteatinfFunction value remains finite as variables → ±∞Rare
fully non-separableCompletely non-separable (strong interactions)Rare
has_constraintsAdditional constraints beyond box boundsRare in this package
has_noiseStochastic noise in evaluationquartic (noisy variants)
highly multimodalVery large number of local minimarastrigin, weierstrass
multimodalMultiple local minimabranin, eggholder
non-convexNot convexackley, rosenbrock
non-separableVariables are coupledrosenbrock, ackley
partially differentiableDifferentiable almost everywherebartelsconn
partially separableSome variables independentRare
quasi-convexQuasi-convexRare
scalableDefined for arbitrary dimension n ≥ 2rosenbrock, rastrigin
separableFully separable (optimize each variable independently)sphere, sumofpowers
strongly convexStrongly convexquadratic
unimodalSingle global minimum (no local minima)sphere
ill-conditionedPoorly conditioned Hessian (slow convergence)rosenbrock

Only these properties are allowed. Adding new ones requires extending VALID_PROPERTIES and updating tests.

Accessing Properties

Use dedicated accessor functions – never access tf.meta[:properties] directly.

Primary Accessor

property(tf::TestFunction, prop::AbstractString) -> Bool

  • Returns true if the property is present.
  • Throws clear error for invalid names.

Example: property(tf, "multimodal") # → true or false

Convenience Shortcuts

bounded(tf) -> Bool scalable(tf) -> Bool differentiable(tf) -> Bool multimodal(tf) -> Bool separable(tf) -> Bool

List All Properties

properties(tf::TestFunction) -> Vector{String}

  • Returns sorted vector of all properties (alphabetical order).

Example: properties(tf)

→ ["bounded", "continuous", "differentiable", "multimodal", "non-convex", "non-separable"]

Filtering Functions by Property

The package provides a helper for easy filtering:

filter_testfunctions(predicate) -> Vector{TestFunction}

Examples:

All bounded functions

boundedfuncs = filtertestfunctions(bounded)

All multimodal functions

multimodalfuncs = filtertestfunctions(multimodal)

Bounded AND scalable functions

boundedscalable = filtertestfunctions(tf -> bounded(tf) && scalable(tf))

Highly multimodal functions

highlymultimodal = filtertestfunctions(tf -> property(tf, "highly multimodal"))

All convex functions

convexfuncs = filtertestfunctions(tf -> convex(tf))

This is the recommended way to explore or benchmark subsets of the collection.

Other Metadata Accessors

AccessorReturnsNotes
name(tf)String (function name)Direct field access
dim(tf)Int or -1 (if scalable)-1 means arbitrary dimension
start(tf, n=nothing)Vector{Float64} (start point)Requires n for scalable
min_position(tf, n=nothing)Vector{Float64} (global minimizer)Requires n for scalable
min_value(tf, n=nothing)Float64 (global minimum value)Requires n for scalable
lb(tf, n=nothing)Vector{Float64} (lower bounds)Requires n for scalable
ub(tf, n=nothing)Vector{Float64} (upper bounds)Requires n for scalable
source(tf)String (literature reference or "Unknown Source")Fallback if missing

These accessors handle scalable functions automatically (pass n when needed).

Design Philosophy

  • Consistency enforced: Test suite checks logical implications and incompatibilities (e.g., convex cannot coexist with multimodal).
  • No raw metadata access: Use accessors for future-proofing and clarity.
  • Extensible: New properties can be added by updating VALID_PROPERTIES and tests.

For questions or to suggest new properties/functions, open an issue on the repository.